package com.peanut.springbootRbac.controller;


import com.peanut.springbootRbac.entity.User;
import com.peanut.springbootRbac.service.UserService;
import com.peanut.springbootRbac.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lemon
 * @since 2024-03-17
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;


    @GetMapping("/list")
    private Result<List<User>> getUserList() {
        return Result.ok(userService.list());
    }

}

